package com.qyhl.webtv.module_user.setting.userinfo;


import com.qyhl.webtv.commonlib.entity.user.UserInfoBean;

/**
 * Created by qyhl on 2017/12/8.
 */

public class UserInfoPresenter implements UserInfoContract.UserInfoPresenter {
    private UserInfoModel mModel;

    private UserInfoActivity mView;

    public UserInfoPresenter(UserInfoActivity mView) {
        this.mView = mView;
        this.mModel = new UserInfoModel(this);
    }

    @Override
    public void upLoadHead(String logo) {
        mModel.upLoadHead(logo);
    }

    @Override
    public void changeInfo(String sex, String email, String nickName) {
        mModel.changeInfo(sex, email, nickName);
    }

    @Override
    public void getUserInfo(String username) {
        mModel.getUserInfo(username);
    }

    @Override
    public void headError(String msg) {
        mView.headError(msg);
    }

    @Override
    public void headSuccess() {
        mView.headSuccess();
    }

    @Override
    public void changeError(String msg) {
        mView.changeError(msg);
    }

    @Override
    public void changeSuccess() {
        mView.changeSuccess();
    }

    @Override
    public void userInfoSuccess(UserInfoBean bean) {
        mView.userInfoSuccess(bean);
    }

    @Override
    public void userInfoError(String msg) {
        mView.userInfoError(msg);
    }
}
